package com.demo.zyt.modules.app.service.impl;


import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.demo.zyt.common.dto.majorplan.MajorPlanDTO;
import com.demo.zyt.common.utils.PageUtils;
import com.demo.zyt.common.utils.Query;
import com.demo.zyt.modules.app.dao.WxUserPointTrackDao;
import com.demo.zyt.modules.app.entity.WxUserPointTrackEntity;
import com.demo.zyt.modules.app.service.WxUserPointTrackService;


@Service("wxUserPointTrackService")
public class WxUserPointTrackServiceImpl extends ServiceImpl<WxUserPointTrackDao, WxUserPointTrackEntity> implements WxUserPointTrackService {

	@Override
	public PageUtils getUserPointTrackList(Integer userId, Map<String, Object> params) {
		
		params.put("userId", userId);
		
		Page<WxUserPointTrackEntity> page = new Query<WxUserPointTrackEntity>(params).getPage();
		
		List<WxUserPointTrackEntity> pointTrackEntities = this.baseMapper.selectByCondition(page, params);
		
        page.setRecords(pointTrackEntities);
        
        return new PageUtils<WxUserPointTrackEntity>(page);
	}
	
}
